home *** CD-ROM | disk | FTP | other *** search
- /* getdrive.c */
- /* compile with MSC 5.0 or above: */
-
- /* cl /c /AL /Zl /FPa /Gs /Ox /W3 getdrive.c */
-
- #include "nandef.h" /* Nantucket C define's */
- #include "extend.h" /* Clipper Extend declarations */
-
- extern char DriveLtr(void); /* Microsoft ASM routine */
- CLIPPER GetDrive(void);
-
- /*
- Function: GetDrive
- Parameters: None
- Returns: char * - the current drive letter using the Clipper
- Summer 87 methods
- Author: Mike Taylor
- Date: 16 December 1988
-
- Description: Returns to a Clipper caller the current drive letter
-
- Called By: Clipper Summer 87 code
- */
-
- CLIPPER GetDrive()
- {
- char DriveStr[3];
-
- /* get the current drive code from DOS and set up the return string */
-
- DriveStr[0] = DriveLtr() + 'A'; /* convert to uppercase letter by */
- /* decimal 65 to the drive code */
- DriveStr[1] = ':';
- DriveStr[2] = '\0';
-
- _retc( DriveStr );
- }